Access to the path '..\ExamineIndexes\[AnyIndex]\Index\segments.gen' is denied.
Hey all, so..
Summary: Umbraco v4.7.1, access to segments.gen denied for any index whenever examine is running on a separate process.
Details:
Examine's LuceneEngine Provider LuceneSearcher contains a method called Search(ISearchCriteria searchParams), which very rarely throw an access denied error when accessing data from the segments.gen file. Now this is not happening because of folder/file permissions.
Currently, I have my files located on a separate storage area network, using Umbraco 4.7.1 & nightly build (.465).The instance uses Umbraco's normal Examine Indexes (Internal & InternalMember), plus two other custom Examine Indexes.
I'm not sure if I'm correct, but I believe Examine renames segments.gen file to segments.new as new documents are indexed. This rename breaks the current search that are going on in a different thread. I've seen this error happening on both the custom Examine Indexes we have built, as well as Umbraco's.
Let's say I want to create a new Dynamic Node(Int32 nodeId). This method will call Examine.LuceneEngine.Providers.LuceneSearcher.Search(ISearchCriteria searchParams) and then this error will be thrown on the rare occasion that Examine is currently indexing/updating/deleting documents.
This is a very difficuly bug to replicate, but it does happen from time to time, specifically when multiple editors are on the CMS at the same time. The error will break anything that uses Examine, so the issue is quite relevant.
Has anyone encountered the same problem?
Here is a full stack trace and error:
Access to the path
'\\san\App_Data\TEMP\ExamineIndexes\Internal\Index\segments.gen'
is denied.
System.UnauthorizedAccessExceptionAccess
to the path
'\\san\App_Data\TEMP\ExamineIndexes\Internal\Index\segments.gen'
is denied.
System.Exception: Error. ---> System.UnauthorizedAccessException: Access to the path '\\san\App_Data\TEMP\ExamineIndexes\Internal\Index\segments.gen' is denied.
at System.IO.__Error.WinIOError(Int32errorCode, StringmaybeFullPath)
at System.IO.FileStream.Init(Stringpath, FileModemode, FileAccessaccess, Int32rights, BooleanuseRights, FileShareshare, Int32bufferSize, FileOptionsoptions, SECURITY_ATTRIBUTESsecAttrs, StringmsgPath, BooleanbFromProxy, BooleanuseLongPath)
at System.IO.FileStream..ctor(Stringpath, FileModemode, FileAccessaccess, FileShareshare, Int32bufferSize, FileOptionsoptions, StringmsgPath, BooleanbFromProxy)
at System.IO.FileStream..ctor(Stringpath, FileModemode, FileAccessaccess, FileShareshare)
at Lucene.Net.Store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor..ctor(FileInfofile, FileAccessmode)
at Lucene.Net.Store.SimpleFSDirectory.OpenInput(Stringname, Int32bufferSize)
at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommitcommit)
at Lucene.Net.Index.DirectoryReader.IsCurrent()
at Examine.LuceneEngine.LuceneExtensions.GetReaderStatus(IndexReaderreader)
at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(BooleanforceReopen)
at Examine.LuceneEngine.Providers.LuceneSearcher.Search(ISearchCriteriasearchParams)
at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32id)
at umbraco.MacroEngines.DynamicBackingItem..ctor(Int32Id)
at umbraco.MacroEngines.DynamicNode..ctor(Int32NodeId)
--- End of inner exception stack trace ---
The error above happened upon using new umbraco.MacroEngines.DynamicNode(Int32 NodeId)
Access to the path '..\ExamineIndexes\[AnyIndex]\Index\segments.gen' is denied.
Hey all, so..
Summary: Umbraco v4.7.1, access to segments.gen denied for any index whenever examine is running on a separate process.
Details:
Examine's LuceneEngine Provider LuceneSearcher contains a method called Search(ISearchCriteria searchParams), which very rarely throw an access denied error when accessing data from the segments.gen file. Now this is not happening because of folder/file permissions.
Currently, I have my files located on a separate storage area network, using Umbraco 4.7.1 & nightly build (.465).The instance uses Umbraco's normal Examine Indexes (Internal & InternalMember), plus two other custom Examine Indexes.
I'm not sure if I'm correct, but I believe Examine renames segments.gen file to segments.new as new documents are indexed. This rename breaks the current search that are going on in a different thread. I've seen this error happening on both the custom Examine Indexes we have built, as well as Umbraco's.
Let's say I want to create a new Dynamic Node(Int32 nodeId). This method will call Examine.LuceneEngine.Providers.LuceneSearcher.Search(ISearchCriteria searchParams) and then this error will be thrown on the rare occasion that Examine is currently indexing/updating/deleting documents.
This is a very difficuly bug to replicate, but it does happen from time to time, specifically when multiple editors are on the CMS at the same time. The error will break anything that uses Examine, so the issue is quite relevant.
Has anyone encountered the same problem?
Here is a full stack trace and error:
Access to the path '\\san\App_Data\TEMP\ExamineIndexes\Internal\Index\segments.gen' is denied.
System.UnauthorizedAccessExceptionAccess to the path '\\san\App_Data\TEMP\ExamineIndexes\Internal\Index\segments.gen' is denied.
The error above happened upon using new umbraco.MacroEngines.DynamicNode(Int32 NodeId)
Thanks in advance!
Adi
This blog also seems to have experienced a similar issue with Lucene.Net during indexing..
http://stackoverflow.com/questions/271661/lucene-net-access-denied-to-segments
Correction:
**Summary: Umbraco v4.7.1, access to segments.gen denied for any index whenever Examine indexes as Lucene runs a search
is working on a reply...